﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MasVida.WebApi.Models.Interfaces
{
    public interface IResponse
    {
        bool Success { get; set; }
        string ErrorMessage { get; set; }
    }

    public abstract class AResponse : IResponse
    {
        private string _errorMessage;

        public bool Success { get; set; } = true;

        public string ErrorMessage
        {
            get { return _errorMessage; }
            set
            {
                Success = false;
                _errorMessage = value;
            }
        }
    }
}
